package com.sxj.PDMS.mapper;

import com.sxj.PDMS.model.entity.Student;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface StudentManageMapper {
    @Select("select count(*) from student")
    public Long selectTotal();

    @Select("select * from student limit #{start},#{pageSize}")
    public List<Student> selectAll(@Param("start") Integer start, @Param("pageSize") Integer pageSize);

    public List<Student> selectWithCondition(@Param("start") Integer start,
                                             @Param("pageSize") Integer pageSize,
                                             @Param("studentNumber") String studentNumber,
                                             @Param("grade") String grade,
                                             @Param("classNum") String classNum,
                                             @Param("name") String name,
                                             @Param("gender") String gender,
                                             @Param("statue") Integer statue,
                                             @Param("thePartyBranch") String thePartyBranch);

    public Long selectWithConditionTotal(@Param("studentNumber") String studentNumber,
                                         @Param("grade") String grade,
                                         @Param("classNum") String classNum,
                                         @Param("name") String name,
                                         @Param("gender") String gender,
                                         @Param("statue") Integer statue,
                                         @Param("thePartyBranch") String thePartyBranch);

    public List<Student> selectWithConditionAndDownload(@Param("studentNumber") String studentNumber,
                                                        @Param("grade") String grade,
                                                        @Param("classNum") String classNum,
                                                        @Param("name") String name,
                                                        @Param("gender") String gender,
                                                        @Param("statue") Integer statue,
                                                        @Param("thePartyBranch") String thePartyBranch);

}
